﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<CourseSystem.Core.Entities.SoftwareInfo>" %>

<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    常用软件编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm("SoftwareEdit", "AdminSupport", new { Model.Id }, FormMethod.Post, new { enctype = "multipart/form-data" }))
       {%>
    <fieldset>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.SoftName) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.SoftName) %>
            <%: Html.ValidationMessageFor(model => model.SoftName) %>
        </div>
        <div class="editor-label">
            <%: Html.Label("上传") %>
        </div>
        <div class="editor-field">
            <% if (!string.IsNullOrEmpty(Model.FileSrc))
               { %>
            <a target="_blank" href="<%= ResolveUrl("~/" + Model.FileSrc) %>">下载</a>
            <br />
            <% } %>
            <input type="file" name="UpFile" />
            <%: Html.ValidationMessageFor(model => model.FileSrc) %>
        </div>
        <p>
            <input type="submit" value="保存" /><%=Html.ActionButton("返回", "Software")%>
        </p>
    </fieldset>
    <% } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
